<?php

namespace App\Http\Controllers\XhApi;


use App\Repository\Commit\DictConfigRepository;
use Illuminate\Http\Request;

class MyController extends BaseController
{
    public $repoist;

    public function index(Request $request)
    {
        $RepoistDictConfig = new DictConfigRepository();
        $kefuSetting = $RepoistDictConfig->getValue('xhKefuSetting');
        $kefuSetting['exclusiveAvatar'] = "/static/xh/customer.png";
        $data = [
            "user" => $request->user,
            "kefu" => $kefuSetting,
            "richGridNum" => 4,
            "richGrids" => [
                ['page' => 'pages/regulations/index?type=xhXhlc', 'name' => '选号流程', 'iconClass' => 'icon icon-procedure'],
                ['page' => 'pages/regulations/index?type=xhJytk', 'name' => '交易条款', 'iconClass' => 'icon icon-term'],
                ['page' => 'pages/regulations/index?type=xhXhzc', 'name' => '送货政策', 'iconClass' => 'icon icon-delivery'],
                ['page' => 'pages/regulations/index?type=xhFwcl', 'name' => '服务承诺', 'iconClass' => 'icon icon-promise'],
                ['page' => 'pages/kefu/index', 'name' => '联系客服', 'iconClass' => 'icon icon-customer'],
            ],
            "ordersTypeList" => config('xh.ordersTypeList')
        ];
        return $this->returnMsg(200, '数据已获取', $data);
    }

//个人设置
    public function setting(Request $request)
    {
        $data = [
            "user" => $request->user
        ];
        return $this->returnMsg(200, '数据已获取', $data);
    }
}
